<?php 
//商品分类的删除
	include_once("./com.php");
	$pc_cid=$_GET['pc_cid'];
	$set="select * from pc_fenlei where pc_fid=$pc_cid";
	$res=mysql_query($set);
	if(mysql_num_rows($res)==0){
		$ser="delete from pc_fenlei where pc_cid=$pc_cid";
		mysql_query($ser);
					if(mysql_affected_rows()>0){
					echo "<script>
						alert('删除成功')
						location.href='product_cate.php'
					</script>";
			}else{
				echo "<script>
						alert('删除失败')
						location.href='product_cate.php'
					</script>";
			}
	}else{
		echo "<script>
				alert('删除失败存在子分类')
				location.href='product_cate.php'
			</script>";
	}
	


 ?>
